package com.awesome.uidemo.eventdispatch;

import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.rule.ActivityTestRule;

import com.awesome.uidemo.R;

import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard;
import static androidx.test.espresso.action.ViewActions.typeText;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;

/**
 * Author: zhangjingfang
 * Email:zhangjingfang@jeejio.com
 * Date: 2021/11/1
 * Description:类描述
 */
@RunWith(AndroidJUnit4.class)
public class EventDispatchUITest {

    @Rule
    public ActivityTestRule<EventDispatchActivity> rule =
            new ActivityTestRule<EventDispatchActivity>(EventDispatchActivity.class, true);


    @Test
    public void login() {
        onView(withId(R.id.et_input)).perform(typeText("Hello"),closeSoftKeyboard());
        onView(withId(R.id.my_tv)).perform(click());
//        onView(withText("是谁消费了我的点击")).perform(click());
    }
}
 
 